﻿using DotNetty.Common.Internal.Logging;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;

namespace TYG.Common
{
    public class TY
    {
        /// <summary>
        /// 流程目录
        /// </summary>
        public static string ProcessDirectory
        {
            get
            {
#if NETSTANDARD2_0 
                return AppContext.BaseDirectory;
#else
                return AppDomain.CurrentDomain.BaseDirectory;
#endif
            }
        }

        public static bool IsSsl { get; set; } = false;
        public static int Port { get; set; } = 8888;
        public static IPAddress Host { get; set; } = IPAddress.Parse("127.0.0.1");

        ///// <summary>
        ///// 实时Logger
        ///// </summary>
        //public static void SetConsoleLogger()
        //{
        //    InternalLoggerFactory.DefaultFactory = LoggerFactory.Create(builder => builder.AddConsole());
        //}

    }
}
